package com.petshop.productcategories.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.petshop.productcategories.mapper.PetProductcategoriesMapper;
import com.petshop.productcategories.domain.PetProductcategories;
import com.petshop.productcategories.service.IPetProductcategoriesService;

/**
 * 商品类别Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-11
 */
@Service
public class PetProductcategoriesServiceImpl implements IPetProductcategoriesService 
{
    @Autowired
    private PetProductcategoriesMapper petProductcategoriesMapper;

    /**
     * 查询商品类别
     * 
     * @param categoryID 商品类别主键
     * @return 商品类别
     */
    @Override
    public PetProductcategories selectPetProductcategoriesByCategoryID(Long categoryID)
    {
        return petProductcategoriesMapper.selectPetProductcategoriesByCategoryID(categoryID);
    }

    /**
     * 查询商品类别列表
     * 
     * @param petProductcategories 商品类别
     * @return 商品类别
     */
    @Override
    public List<PetProductcategories> selectPetProductcategoriesList(PetProductcategories petProductcategories)
    {
        return petProductcategoriesMapper.selectPetProductcategoriesList(petProductcategories);
    }

    /**
     * 新增商品类别
     * 
     * @param petProductcategories 商品类别
     * @return 结果
     */
    @Override
    public int insertPetProductcategories(PetProductcategories petProductcategories)
    {
        return petProductcategoriesMapper.insertPetProductcategories(petProductcategories);
    }

    /**
     * 修改商品类别
     * 
     * @param petProductcategories 商品类别
     * @return 结果
     */
    @Override
    public int updatePetProductcategories(PetProductcategories petProductcategories)
    {
        return petProductcategoriesMapper.updatePetProductcategories(petProductcategories);
    }

    /**
     * 批量删除商品类别
     * 
     * @param categoryIDs 需要删除的商品类别主键
     * @return 结果
     */
    @Override
    public int deletePetProductcategoriesByCategoryIDs(Long[] categoryIDs)
    {
        return petProductcategoriesMapper.deletePetProductcategoriesByCategoryIDs(categoryIDs);
    }

    /**
     * 删除商品类别信息
     * 
     * @param categoryID 商品类别主键
     * @return 结果
     */
    @Override
    public int deletePetProductcategoriesByCategoryID(Long categoryID)
    {
        return petProductcategoriesMapper.deletePetProductcategoriesByCategoryID(categoryID);
    }
}
